led_on.bin: led_on.o 
	arm-linux-ld -e _start -Ttext 0x0C000000 -o led_on.elf $^
	arm-linux-objcopy -O binary led_on.elf $@
	arm-linux-objdump -D led_on.elf > led_on.dis
	
led_on.o : led_on.S
	arm-linux-gcc -c $< -o $@

.PHONY:install
	umount /dev/mmcblk0p1
	sudo dd if=./led.bin of=/dev/mmcblk0 seek=8059870208 bs=1

.PHONY:clean
clean:
	rm *.o *.elf *.bin *.dis
